%% process_plot_ex_scalar
function process_plot_ex_scalar(pde, func_f, varargin)
[x, y, z] = meshgrid(linspace(pde.domain(1), pde.domain(2), 30), ...
    linspace(pde.domain(3), pde.domain(4), 30), ...
    linspace(pde.domain(5), pde.domain(6), 30));
if isempty(varargin)
    sol_ex = func_f(x, y, z);
else
    sol_ex = func_f(x, y, z, varargin{1});
end
val_m = 0.5*(max(sol_ex(:))+min(sol_ex(:)));
val_l = 0.5*min(sol_ex(:))+val_m;
val_r = 0.5*max(sol_ex(:))+val_m;
% slice
figure("WindowStyle", "docked");
slice(x, y, z, sol_ex, [], [], pde.domain(5):0.2:pde.domain(6));
colorbar;
shading interp;
xlabel("x");
ylabel("y");
zlabel("z");
title("analysis(slice)");
axis("equal", "tight");
view(120, 30);
% isosurface
figure("WindowStyle", "docked");
isosurface(x, y, z, sol_ex, val_m);
hold on;
isosurface(x, y, z, sol_ex, val_l);
isosurface(x, y, z, sol_ex, val_r);
hold off;
colorbar;
xlabel("x");
ylabel("y");
zlabel("z");
title("analysis(isosurface)");
axis("equal", "tight");
view(120, 30);
% scatter3
x_vec = x(:);
y_vec = y(:);
z_vec = z(:);
u_vec = sol_ex(:);
figure("WindowStyle", "docked");
scatter3(x_vec, y_vec, z_vec, 20, u_vec, "filled");
colorbar;
xlabel("x");
ylabel("y");
zlabel("z");
title("analysis(scatter3)");
axis("equal", "tight");
view(120, 30);
end